import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { NewsComponent } from './components/news/news.component';
import { NewslistComponent } from './components/news/newslist/newslist.component';
import { EditComponent } from './components/news/edit/edit.component';
const routes: Routes = [
  {
    path: 'new',
    component: NewsComponent,
  },
  {
    path: 'newsdetail',
    component: NewslistComponent
  },
  {
    path: 'edit',
    component: EditComponent
  },
  {
    path: '**',
    redirectTo: 'new'
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
